/**
 * date: 2018年2月20日
 * 使用'Visual Studio Code 1.18.1'编写
 *
 * https://www.tslang.cn/docs/handbook/variable-declarations.html
 *
 */
function sumMatrix(matrix) {
    var sum = 0;
    for (var i = 0; i < matrix.length; i++) {
        var currentRow = matrix[i];
        for (var i_1 = 0; i_1 < currentRow.length; i_1++) {
            sum += currentRow[i_1];
        }
    }
    return sum;
}
var _loop_1 = function (i) {
    setTimeout(function () { console.log(i); }, 100 * i);
};
/**
 * 直接在js中这样写是有问题的
 * TypeScript将其进行了优化,运行 `tsc Ts103_variable_declarations.ts`
 * 看看输出的js文件来学习在js中的正确写法
 */
for (var i = 0; i < 10; i++) {
    _loop_1(i);
}
//const 
var numLivesForCat = 9;
var kitty = {
    name: "Aurora",
    numLives: numLivesForCat
};
//解构数组
var input = [1, 2];
var first = input[0], second = input[1];
console.log(first); // outputs 1
console.log(second); // outputs 2
//对象解构
var o = {
    a: "foo",
    b: 12,
    c: "bar"
};
var a = o.a, b = o.b;
